package cn.itcast.dao.system;

import cn.itcast.domain.system.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserDao {

    public List<User> findAll(String companyId);

    void save(User user);

    User findById(String id);

    void updateById(User user);

    void deleteById(String id);


    void saveUserAndRole(@Param("userid") String userid, @Param("roleid") String roleid);

    List<String> findRoleIdsByUserId(String userid);

    void deleteUserAndRoleByUserId(String userid);// delete from pe_role_user where user_id=?

    User findByEmail(String email);

    List<User> findbycurrentDate(String currentDate);

    List<User> findByDate(String newDate);
}
